﻿@using KRM.Core

@using KRM.Core.Library
@model IEnumerable<KRM.Core.tblBookNotification>
@{    
    var currentUser = Users.Current(User.Identity.Name);
}
@if(currentUser!=null){
<input type="hidden" id="LastActivitiesTime" value="@DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")"/>
                foreach (var item in Model)
                {
                    var owner = (@item.tblBook.PersonalId == @currentUser.HRPersonalId);
                    <li>
                        <div class="col1">
                            <div class="cont">
                                <div class="cont-col1">
                                    <img src="/Upload/Avatar/@(item.tblPersonalFrom.Image??"avatar-default.jpg")">
                                </div>
                                <div class="cont-col2">
                                    <div class="desc">
                                        <a href="@(owner?"/HolidayRequest/ViewHolidayRequest/":"/Holidaymanagement/ViewHolidayRequest/")@item.BookId" class="from">@item.tblPersonalFrom.FullName </a>
                                         @Html.Raw(@item.HtmlNotification(User.Identity.Name))
                                        <p class="activites-action"><span class="@item.tblBookCommentType.LabelClass"> @(item.tblBookCommentType == null ? "" : item.tblBookCommentType.Name)</span></p>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col2">
                            <div class="date">
                                @item.DateCreated
                            </div>
                        </div>
                    </li>
                }
}


